package com.yuhs.zixing.study.design.pattern.dp002.create.c004.builder.b002;

/**
 * @description: 指挥者
 * @author: yuhs
 * @date: 2022/4/29 9:34 AM
 */
public class HouseDirector002 {
    HouseBuilder002 houseBuilder002 = null;

    public HouseDirector002(HouseBuilder002 houseBuilder002) {
        this.houseBuilder002 = houseBuilder002;
    }

    public void setHouseBuilder002(HouseBuilder002 houseBuilder002) {
        this.houseBuilder002 = houseBuilder002;
    }

    public House002 constructHouse() {
        houseBuilder002.buildBasic();
        houseBuilder002.buildWalls();
        houseBuilder002.buildRoofed();
        return houseBuilder002.buildHouse();
    }
}
